package com.example.tourpal.util;

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.Log;
import android.widget.Toast;

public class Tools {
	private static String TAG = "chengongguo/Tools";
	private Toast mToast;
	private Context mContext;

	@SuppressLint("ShowToast")
	public Tools(Context context, String tag) {
		mContext = context;
		mToast = Toast.makeText(mContext, "onCreate()", Toast.LENGTH_SHORT);
	}

	public Tools(String tag) {
	}

	public void showLog(String string) {
		Log.i(TAG, string);
	}

	public static void Log(String string) {
		Log.i(TAG, string);
	}

	public void showToast(String string) {
		mToast.setText(string);
		mToast.show();
	}

	public void showToast(int stringId) {
		mToast.setText(mContext.getResources().getString(stringId));
		mToast.show();
	}
}
